package providev.learn.imagina.tema2_3;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Principal extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.principal);
        
        Button boton = (Button) findViewById(R.id.button1);
        boton.setOnClickListener(new OnClickListener() {
                         
                         public void onClick(View v) {
                                 String action = "providev.learn.imagina.tema2_3_s.MI_ACCION2";
                                 Intent intent = new Intent(action);
                                 sendBroadcast(intent);
                         }
                 });

    }
}